Fm/task/unst 9257 snap longculvert 2#497
Fm/task/unst 9257 snap longculvert 2#497FlorisBuwaldaDeltares wants to merge 45 commits intomainfrom
Conversation
…lvert, and one containing two longculvert (one with four and one with two points).
|
|
||
| ! prevFont = SelectObject (hdc, font) | ||
| ! Disable invalid operation exceptions temporarily | ||
| call ieee_set_halting_mode(ieee_invalid, .false.) |
There was a problem hiding this comment.
Wat is dit nou weer? Interactor probleempje?
There was a problem hiding this comment.
oh ja, interacter OpenGL doet het niet in debug door een openGL floating point exception. Al een langlopend irritatiepuntje van iedereen, en copilot wist toevallig hoe je dit fixte. Als je wil kan het ook in een aparte MR
There was a problem hiding this comment.
Nee hoor, prima om het erbij te doen
| call PetscFinalize(ierr) | ||
| if (jampi > 0) then | ||
| call mpi_comm_free(PETSC_COMM_WORLD, ierr) | ||
| call PetscInitialized(isInitialized, ierr) |
There was a problem hiding this comment.
Het kan maar beter initialized zijn voordat je het finalized. Maar ging dit mis?
There was a problem hiding this comment.
ik kreeg een error, maar kan ook zijn dat dat door m'n heap corruption was (die had ik per ongeluk veroorzaakt ergens). Ik revert dit wel
| !> simple routine which checks if a given flowlink L is part of a 2D-2D longculvert. Lives here to avoid cyclic dependency. | ||
| elemental subroutine is_2D2D_longculvertlink(L, res, i) | ||
| integer, intent(in) :: L !< Flowlink number | ||
| logical, intent(out) :: res !< Result: true if L is part of a 2D-2D longculvert |
There was a problem hiding this comment.
Je kan ook i = 0 doen als de link niet kan vinden in plaats van res = .false.. Scheelt weer een intent(out) maar misschien vind je dat niet mooi :)
There was a problem hiding this comment.
oja, het is denk ik niet onduidelijker en scheelt weer een argument, goed idee!
| end do | ||
| end if | ||
|
|
||
| if (allocated(contactnetlinks) .and. allocated(contactids_2D2D)) then |
There was a problem hiding this comment.
Do I understand correctly that the 2D2D link is valid only if both endpoints lie in the same partition?
| end do | ||
|
|
||
| if (newculverts) then | ||
| do ilongc = 1, nlongculverts |
There was a problem hiding this comment.
Floris explained to me what this code was for and why it can be removed. If I understand correctly:
Before the snapping, we would add extra links from the endpoints to the centers, which has a high risk of creating small links at very sharp angles. And this code somehow corrects the flow calculation.
| use m_GlobalParameters, only: flow1d_eps10 | ||
| use precision, only: comparereal | ||
| use gridoperations, only: incells | ||
| ! subroutine longculvert_check_polyline(j, yplCulv, xplCulv) |
|
|
||
| !> Find 2D netcell the longculvert endpoint is located in, add a new node and return its node number | ||
| subroutine longculvert_create_endpoint(j, k) | ||
| subroutine longculvert_create_endpoint(x, y, z, k) |
| @@ -1,3 +1,56 @@ | |||
| # Function to copy all required runtime dependencies for dflowfm_kernel tests | |||
| function(copy_dflowfm_test_dependencies TARGET_NAME) | |||
| if(WIN32) | |||
There was a problem hiding this comment.
Oh, no. Maybe move the if(WIN32) outside this function to make it clear that this ugly fix is only needed on windows
| <file name="DFM_OUTPUT_tunnel/tunnel_0000_his.nc" type="NETCDF"> | ||
| <parameters> | ||
| <parameter name="longculvert_discharge" toleranceAbsolute="0.005" /> | ||
| <parameter name="longculvert_discharge" toleranceAbsolute="0.003" /> |
| </checks> | ||
| </testCase> | ||
| <testCase name="e02_f014_c150" ref="dimr"> | ||
| <path version="2025-10-15T15:07:20.418000">e02_dflowfm/f014_parallel/c150_longculvert_parallel</path> |
There was a problem hiding this comment.
I'm guessing the references for these testcases had to be updated. Too bad, but probably necessary, right?
rene-deltares
left a comment
There was a problem hiding this comment.
I think all my suggestions are optional. Let me know if you need another approval
What was done
Evidence of the work done
<add video/figures if applicable>
Tests
<add testcase numbers if applicable, Issue number>
Documentation
<add description of changes if applicable, Issue number>
Issue link